# Edit the lines below to point to any needed include and link paths
# Or to change the compiler's optimization flags
CC = g++
LD = g++
CFLAGS = -g -O3 -I../gltools
LFLAGS = -framework OpenGL -framework GLUT

all:
# compile the files
	$(CC) $(CFLAGS) -c ../gltools/Shader.cpp -o ./shader.o
	$(CC) $(CFLAGS) -c ../gltools/Framebuffer.cpp -o ./framebuffer.o

	$(CC) $(CFLAGS) -c phongshading.cpp -o phongshading.o 
	$(CC) $(CFLAGS) -c rendertexture.cpp -o rendertexture.o
	$(CC) $(CFLAGS) -c shadowmapping.cpp -o shadowmapping.o
	
# link them
	$(LD) $(LFLAGS) rendertexture.o shader.o framebuffer.o -o rendertexture
	$(LD) $(LFLAGS) phongshading.o shader.o framebuffer.o -o phongshading
	$(LD) $(LFLAGS) shadowmapping.o shader.o framebuffer.o -o shadowmapping



clean:
	rm *.o;
	rm rendertexture;
	rm phongshading;
	rm shadowmapping;

